import request from '@/utils/request'

export function listLedger(query) {
    return request({
        url: '/resource/ybsj/list',
        method: 'get',
        params: query
    })
}

export function newListLedger(query) {
    return request({
        url: '/resource/ybsj/ledger/list',
        method: 'get',
        params: query
    })
}

export function FormLedger(bzwzId) {
    return request({
        url: '/resource/bzwz/' + bzwzId,
        method: 'get',
    })
}

export function delLedger(chackIds) {
    return request({
        url: 'resource/bzwz/check/delete/' + chackIds,
        method: 'delete',
    })
}

export function checkListLedger(query) {
    return request({
        url: 'resource/bzwz/check/list',
        method: 'get',
        params: query
    })
}

export function bzwzList(query) {
    return request({
        url: '/resource/bzwz/jcxm/list',
        method: 'get',
        params: query
    })
}

export function delYbsjList(ybsjIds) {
    return request({
        url: '/resource/ybsj/delete/' + ybsjIds,
        method: 'delete',
    })
}

export function ybsjViewForm(ybsjId) {
    return request({
        url: '/resource/ybsj/' + ybsjId,
        method: 'get',
    })
}

export function addYbsj(query) {
    return request({
        url: '/resource/ybsj',
        method: 'post',
        data: query
    })
}

export function bzwzOut(query) {
    return request({
        url: '/resource/bzwz/out',
        method: 'put',
        data: query
    })
}

export function batchYbypOut(query) {
    return request({
        url: '/resource/ybsj/out',
        method: 'post',
        data: query
    })
}

export function getJcxmList() {
    return request({
        url: '/resource/bzwz/jcxm/bucketList',
        method: 'get',
    })
}

// 查询领用记录列表
export function listUseList(query) {
    return request({
        url: '/resource/ybsj/out/list',
        method: 'get',
        params: query
    })
}

// 超期处置列表查询
export function listDelayHandle(query) {
    return request({
        url: '/resource/bzwz/delayHandle/list',
        method: 'get',
        params: query
    })
}

// 处置按钮查询
export function handleForm(bzwzIds) {
    return request({
        url: 'resource/bzwz/handle/batch/' + bzwzIds,
        method: 'get',
    })
}

// 超期处置保存
export function saveBatchHandle(query) {
    return request({
        url: '/resource/bzwz/handle/batch',
        method: 'post',
        data: query
    })
}

export function getTotalPrice() {
    return request({
        url: '/resource/bzwz/out/count',
        method: 'get',
    })
}

export function listHandle(query) {
    return request({
        url: '/resource/bzwz/handle/list',
        method: 'get',
        params: query
    })
}

export function getRemainGg(bzwzId) {
    return request({
        url: '/resource/ybsj/count/' + bzwzId,
        method: 'get',
    })
}

export function saveRemainGg(query) {
    return request({
        url: '/resource/ybsj/updateCount',
        method: 'put',
        data: query
    })
}


/**一般试剂领用开始 */
export function selectedYbsjList(query) {
    return request({
        url: '/resource/ybsj/selectedYbsjList',
        method: 'get',
        params: query
    })
}

export function selectedYbsj(ybsjId) {
    return request({
        url: '/resource/ybsj/selectYbsj/out/' + ybsjId,
        method: 'post',
    })
}


export function cancelSelectedYbsj(outId) {
    return request({
        url: '/resource/ybsj/out/' + outId,
        method: 'delete',
    })
}


export function clearAll() {
    return request({
        url: '/resource/ybsj/out/deleteAll',
        method: 'delete',
    })
}

export function outCount() {
    return request({
        url: '/resource/ybsj/out/outSelectedCount',
        method: 'get',
    })
}
/**一般试剂领用结束 */